<script type="text/javascript" src="js/jquery.validate.min.js"></script>
<script type="text/javascript" src="tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="tiny_mce/config.js"></script>
<script type="text/javascript">
	tiny('detail');
</script>
<div id="content-login">
  <form method="post" action="advancedsearch/send_request">	
  <div align="center">
  <br>
  <table align="center" width="85%">
  	<tr>
  			<td colspan="2" align="left" style="padding:5px"><h3>ฟอร์มการขออนุญาตใช้ข้อมูล</h3></td>
  		</tr>
  		<tr>
  			<td width="120" style="padding:5px">
  				<label><b>เรื่อง : </b></label>
  			</td>
  			<td style="padding:5px"><?=$detail['title'];?></td>
  		</tr>
  		<tr>
  			<td style="padding:5px"><label><b>ผู้แต่ง/ผู้จัดทำ : </b></label></td>
  			<td style="padding:5px">
			  <?php 
				$authors = $this->db->getarray('select tags.tag from tags join tbknowledge_author as ktags on ktags.author_id = tags.id  where ktags.tbknowledge_id = ?', array($detail['id']));
				foreach($authors as $k => $author) echo ($k > 0) ? ', '.$author['tag'] : $author['tag'];
			  ?>			
  			</td>		
	  	</tr>
  	<tr>
  		<td colspan="2" style="padding:5px">ข้อความที่ต้องการส่งเพื่อขออนุญาต</td>
  	</tr>
  	<tr>       
  		<td colspan="2" style="padding:5px"><textarea name="detail"></textarea></td>
  	</tr>
  	<tr>  		
  		<td colspan="2" align="center">
  			<input type="hidden" name="tbknowledge_id" value="<?=$detail['id']?>">
  			<input type="submit" name="btn_send" value="ส่งข้อความ">
  		</td>
  	</tr>
  </table>
  </div>
  </form>
<br clear="all">
</div>